<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        body {
            width: 450px;
            padding: 10px;
            font-family: Arial, sans-serif;
            font-size: 13px;
        }
        .container {
            text-align: center;
        }
        .query-options {
            margin: 10px 0;
        }
        .query-options label {
            margin: 0 10px 0 3px;
        }
        input[type="text"] {
            width: 80%;
            padding: 8px;
            margin: 5px 0;
        }
        button {
            padding: 8px 16px;
            background-color: #4285f4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            margin: 10px 0;
        }
        button:hover {
            background-color: #3367d6;
        }
        #results {
            margin-top: 15px;
            max-height: 400px;
            overflow-y: auto;
        }
        .result-item {
            padding: 10px;
            margin: 8px 0;
            background-color: #f0f0f0;
            border-radius: 4px;
            text-align: left;
        }
        .result-item strong {
            color: #202124;
        }
        .position-group {
            margin: 8px 0 8px 10px;
            padding-left: 10px;
            border-left: 2px solid #ddd;
        }
        .error {
            color: #d93025;
            margin-top: 10px;
        }
        .section-title {
            font-weight: bold;
            margin: 8px 0 4px 0;
            color: #5f6368;
        }
    </style>
</head>
<body>
<div class="container">
    <h3>元素位置查找器</h3>
    <div class="query-options">
        <input type="radio" id="byClass" name="queryType" value="class" checked>
        <label for="byClass">按类名</label>
        <input type="radio" id="byId" name="queryType" value="id">
        <label for="byId">按ID</label>
    </div>
    <input type="text" id="queryValue" placeholder="输入类名或ID（无需加.或#）">
    <br>
    <button id="findBtn">查找元素</button>
    <div id="results"></div>
</div>
<script src="popup.js"></script>
</body>
</html>
